The cofactor conditions, as the conditions of compatibility between phases consist of two main subconditions: (CC1) , which means the middle principle stretch of the transformation is unity, (CC2) (a.v2)(n.v2)=0 where the vector n is the normal of twinning plane, the vector a corresponds to the twinning shear and the vector v2 is the undistorted direction associated with the middle principle stretch, and a mild inequality condition (CC3) that is always true for Type I and Type II twin system of martensite. The microstructure of a material undergoing martensitic transformation has strongly dependence on the conditions of compatibility, and further influences the macroscopic properties of the material. Here we report an example of a phase-changing material with the satisfaction of the cofactor conditions for both Type I and Type II twins. Theoretically, as a result of the satisfaction of both Type I and Type II cofactor conditions, two martensite variants can form a triple junction with austenite with perfect fit at each of the interfaces , while they can also form a quad-junction with the other two variants through Type II twinning interfaces without paying additional elastic energy. Macroscopically, many compatible triple and quad junction with different volume fraction become building blocks for the microstructure of the material undergoing phase transformation. Experimentally, we have observed the riverine strip microstructures as well as zig-zag interfaces in this material by the optical microscopy, which is completely unreproducible for the consecutive transformation cycles while the hysteresis and the latent heat are stable for each of the cycles. To further quantify the orientation correspondences between the real microstructure observed under the optical microscopy and the calculated morphology by the theory, we use the electron backscatter diffraction technique to measure the orientation for each martensite variant, then verify the cofactor conditions by calculating the rotation matrix connecting the adjacent variants.